package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 评论的子评论。
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 3/30/15
 * Time: 18:15
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class CommentChildFeed implements Parcelable {
    private int id = 0;
    private String content = "";
    private long publish_time = 0;
    private AuthorFeed author = null;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(long publish_time) {
        this.publish_time = publish_time;
    }

    public AuthorFeed getAuthor() {
        return author;
    }

    public void setAuthor(AuthorFeed author) {
        this.author = author;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.content);
        dest.writeLong(this.publish_time);
        dest.writeParcelable(this.author, flags);
    }

    public CommentChildFeed() {
    }

    private CommentChildFeed(Parcel in) {
        this.id = in.readInt();
        this.content = in.readString();
        this.publish_time = in.readInt();
        this.author = in.readParcelable(AuthorFeed.class.getClassLoader());
    }

    public static final Parcelable.Creator<CommentChildFeed> CREATOR = new Parcelable.Creator<CommentChildFeed>() {
        public CommentChildFeed createFromParcel(Parcel source) {
            return new CommentChildFeed(source);
        }

        public CommentChildFeed[] newArray(int size) {
            return new CommentChildFeed[size];
        }
    };
}
